﻿using DayuCode.Designer.Entity.UI;
using DayuCode.Designer.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DayuCode.Designer.Service.ui
{
    public class DataGridColumnHandler
    {
        private static string getBaseUrl(string methodName)
        {
            return AppInstance.ApiServer + "api/base/dayucode_dataGridColumnHandler/" + methodName;
        }

		public static void deleteDataGridColumn(long id)
		{
			QHttpClient.Execute(getBaseUrl("deleteDataGridColumn"), new { id = id });
		}

		public static HDataGridColumn updateProp(long id, string propName, string value)
		{
			HDataGridColumn obj = QHttpClient.Post<HDataGridColumn>(getBaseUrl("updateProp"), new { id = id, propName = propName, value = value });
			return obj;
		}

		public static HDataGridColumn saveDataGridColumn(HDataGridColumn item)
		{
			HDataGridColumn obj = QHttpClient.Post<HDataGridColumn>(getBaseUrl("saveDataGridColumn"), new { item = item });
			return obj;
		}

		public static HDataGridColumn getDataGridColumn(long id)
		{
			HDataGridColumn obj = QHttpClient.Post<HDataGridColumn>(getBaseUrl("getDataGridColumn"), new { id = id });
			return obj;
		}



	}
}
